<template>
  <RouterView />
</template>

<script setup>
import { onMounted } from 'vue';
import { RouterView } from 'vue-router';
import { Local } from './utils/storage';
import { checkLogin } from './v-api/login';
import router from "@/router";
onMounted(() => {
  if(Local.get('userInfo') === null){
    router.push('/login')
  }
  else{
    const loginInfo=Local.get('loginInfo');
    if(loginInfo === null){
      return
    }
    checkLogin()
  }
})
</script>